;
(function() {
	var config = require("../../core/_include/config");
	var ResponObj = require("../_include/responObj");
	var qrcode = require("./qrcode");
	module.exports = {
		prefix: "/qrcode",
		get: {
			"/": function() {
				var self = this;
				var query = self.request.query;
				query.str = String(query.str || "").trim();
				if (!query.str) {
					throwCusError("参数错误")
				}
				query.logo = String(query.logo || "").trim();
				qrcode.get(query, function(data) {
					self.body = ResponObj("json", data);
				}, function(e) {
					self.body = ResponObj("error", e.message);
				})
			}
		}
	}
}());